<template>
  <view class="edit_box">
    <view class="edit_box_title">输入信息</view>
    <up-input v-model="formData.aliPay" placeholder="输入支付宝号" border="bottom"> </up-input>
    <up-input placeholder="输入真实姓名" border="bottom" v-model="formData.realName"></up-input>
    <view class="bottomBox">
      <u-button type="primary" @click="submit" color="#02409a">提交</u-button>
    </view>
  </view>
</template>

<script lang="ts" setup>
import { updateUserAliPay } from "@/api/my";
import { ref } from "vue";
const formData = ref({
  aliPay: "",
  realName: "",
  userId: uni.getStorageSync("userId"),
});
const submit = async () => {
  await updateUserAliPay(formData.value);
  uni.showToast({
    title: "修改成功",
    icon: "success",
    duration: 2000,
    complete() {
      setTimeout(() => {
        uni.navigateBack();
      }, 1000);
    },
  });
};
</script>

<style lang="less" scoped>
@import "./edit.less";
/deep/.u-input {
  padding: 34rpx 0px !important;
}
</style>
